home *** CD-ROM | disk | FTP | other *** search
/ CSi Master: Ableton Live 5 / CSi Master: Ableton Live 5.iso / pc / rsrc / locrsrc / cstshared.cst / 00014_keycheckLOGIC.ls < prev    next >
Encoding:
Text File  |  2005-07-28  |  5.5 KB  |  237 lines

  1. on keycheckLOGIC_OLD
  2.   
  3.   --------------- REWIND -------------------v
  4.   if the keyCOde = 123 then -- LEFT
  5.     -- puppetSound "PSM text button beep"
  6.     set the member of sprite 15 to member "rewind on"
  7.     
  8.     case (the name of member (the member of sprite 32)) of
  9.       "QT pause": 
  10.         nothing
  11.       "QT play": 
  12.         set the castNum of sprite 32 to the number of cast "QT pause"
  13.     end case
  14.     
  15.     updateStage
  16.     
  17.     repeat while soundBusy(1)
  18.       nothing
  19.     end repeat
  20.     
  21.     if the optiondown then
  22.       set the movierate of sprite 46 to -3
  23.     else
  24.       set the movierate of sprite 46 to -2
  25.     end if
  26.     
  27.     global gQTcontrolRatio
  28.     set the locH of sprite 31 to ((the left of sprite 19) + ((the mtime of sprite 46)/gQTcontrolRatio) + 7)
  29.     updatestage
  30.     
  31.   end if
  32.   
  33.   --------------- FST FWD -------------------v
  34.   if the keyCOde = 124 then -- RIGHT
  35.     -- puppetSound "PSM text button beep"
  36.     set the member of sprite 16 to member "fast forward on"
  37.     
  38.     case (the name of member (the member of sprite 32)) of
  39.       "QT pause": 
  40.         nothing
  41.       "QT play": 
  42.         set the castNum of sprite 32 to the number of cast "QT pause"
  43.     end case
  44.     
  45.     updateStage
  46.     
  47.     repeat while soundBusy(1)
  48.       nothing
  49.     end repeat
  50.     
  51.     if the optiondown then
  52.       set the movierate of sprite 46 to 3
  53.     else
  54.       set the movierate of sprite 46 to 2
  55.     end if
  56.   end if
  57.   
  58.   --------------- PLAY PAUSE -------------------v
  59.   if the key = SPACE then
  60.     puppetSound "PSM text button beep"
  61.     updateStage
  62.     
  63.     repeat while soundBusy(1)
  64.       nothing
  65.     end repeat
  66.     
  67.     puppetSound 0
  68.     updateStage
  69.     
  70.     case (the name of member (the member of sprite 32)) of
  71.       "QT pause": 
  72.         set the member of sprite 32 to member "pause button dn"
  73.         updatestage
  74.         starttimer
  75.         repeat while the mousedown
  76.         end repeat
  77.         repeat while the timer < 14
  78.         end repeat
  79.         set the movieRate of sprite 46 to 0
  80.         set the castNum of sprite 32 to the number of cast "QT play"
  81.       "QT play": 
  82.         set the member of sprite 32 to member "play button dn"
  83.         updatestage
  84.         starttimer
  85.         repeat while the mousedown
  86.         end repeat
  87.         repeat while the timer < 14
  88.         end repeat
  89.         set the movieRate of sprite 46 to 1
  90.         set the castNum of sprite 32 to the number of cast "QT pause"
  91.     end case
  92.     
  93.     updateStage
  94.   end if
  95.   
  96.   
  97.   --    if the key = "t" then
  98.   --      put "--------->" & the movietime of sprite 46
  99.   --    end if
  100.   --  
  101.   --  if the key = "," then
  102.   --    set the movierate of sprite 46 to -1
  103.   --  end if
  104.   --  if the key = "." then
  105.   --    set the movierate of sprite 46 to 1
  106.   --  end if
  107.   --  if the key = "-" then
  108.   --    set the movierate of sprite 46 to -2
  109.   --  end if
  110.   --  if the key = "=" then
  111.   --    set the movierate of sprite 46 to 2
  112.   --  end if
  113.   
  114.   
  115.   -- ADJUSTED FOR GCHELP!!!!!!!
  116.   
  117.   if the commandDown and the key = "q" OR the keyCode = 53 then
  118.     openQuitBoxFromIE
  119.   end if
  120.   
  121.   -->> DOWN ARROW KEY
  122.   if the keyCOde = 125 then
  123.     
  124.     put the timer into vStartTime
  125.     
  126.     put the soundlevel into vLevel
  127.     
  128.     if vLevel > 0 then
  129.       set vLevel = vLevel - 1
  130.       updateStage
  131.     end if
  132.     
  133.     set the soundlevel = vLevel
  134.     
  135.     puppetSound "volume beep"
  136.     updateStage
  137.     
  138.   end if
  139.   
  140.   -->> UP ARROW KEY
  141.   if the keyCOde = 126 then
  142.     
  143.     put the timer into vStartTime
  144.     
  145.     put the soundlevel into vLevel
  146.     if vLevel < 7 then
  147.       set vLevel = vLevel + 1
  148.       updateStage
  149.     end if
  150.     
  151.     set the soundlevel = vLevel
  152.     
  153.     puppetSound "volume beep"
  154.     updateStage
  155.     
  156.   end if
  157.   
  158.   -- CATCH TUTORIAL (SO KEY COMANDS BELOW WON'T APPEAR)
  159.   global TutorialMovie
  160.   if TutorialMovie = 1 then
  161.     exit
  162.   end if
  163.   
  164.   global gBrowserMoviePath
  165.   
  166.   if the keyCode = 114 or (the commandDown and the keyCode = 44) or (the commandDown and the key = "h") then
  167.     global helpBox
  168.     if objectP(helpBox) then
  169.       closeHelpBox
  170.     else
  171.       showHelpBox
  172.     end if
  173.   end if
  174.   
  175.   global hideDesk, gPrint
  176.   if the commandDown and the key = "o" then
  177.     TELL THE STAGE TO openControllerWindow
  178.   end if
  179.   
  180.   if the commandDown and the key = "m" then
  181.     global gAllMute, gSavedSoundLevel
  182.     
  183.     if gAllMute = 0 then
  184.       put the soundlevel into gSavedSoundLevel
  185.       set the soundlevel = 0
  186.       set gAllMute = 1
  187.     else
  188.       set the soundlevel = gSavedSoundLevel
  189.       set gAllMute = 0
  190.     end if
  191.   end if
  192.   
  193.   if (the keyCode = 113 and the machineType <> 256) or (the commandDown and the key = ENTER and the machineType <> 256) then
  194.     
  195.     tell the stage
  196.       
  197.       ----- TAKEN OUT BECAUSE OF OSX ERROR -----
  198.       --      if objectP(finderSwitch) then
  199.       --        finderSwitch(mDispose)
  200.       --      end if
  201.       --      
  202.       --      openXlib (the pathName & "FinderSwitcher XObj")
  203.       --      
  204.       --      put FinderSwitcher(mNew) into finderSwitch
  205.       --      if objectP(finderSwitch) then finderSwitch(mSwitchToFinder)
  206.       
  207.     end tell
  208.     
  209.   end if
  210.   
  211.   if the commandDown and the key = "n" then
  212.     global gMute,gFade, gAllMute
  213.     if (gMute = 1) then
  214.       if gFade <> 1 and gAllMute <> 1 then
  215.         set the volume of sound (2) to 255
  216.       end if
  217.       
  218.       set gMute = 0
  219.     else
  220.       if gMute = 0 then
  221.         set the volume of sound (2) to 0
  222.         
  223.         set gMute = 1
  224.       end if
  225.     end if
  226.     updateStage
  227.   end if
  228.   
  229.   if the commandDown and the key = "w" then
  230.     global gControllerWindow
  231.     if objectP(gControllerWindow) then
  232.       TELL THE STAGE TO forget gControllerWindow
  233.     end if
  234.   end if
  235.   
  236. end
  237.